#pragma once

class Dungeon
{
private:
	char dungeon[10][10];
	int xpos, ypos;
	int mxpos, mypos;
	bool exited;
	bool dead;
	int numTraps;


	//Randomly generate a new dungeon with the given amount of traps
	void genDungeon(int traps);

	//Draw the dungeon to the console
	void drawDungeon();

	/*Moves the player in the dungeon. Returns true if the player has moved to
	an empty space and false if the player has moved into a trap or the exit*/
	bool movePlayer(int xChange, int yChange);

	/*Handles player input and movment. Returns true while the player should
	still be able to move the character in the dungeon*/
	bool playerTurn();

	//Reset the flags for player death and exit
	void resetDungeon();

	/*Determines how the monster should move this turn,
	returns the boolean that flags player death*/
	bool monsterAI();

	/*Move the monster inside the dungeon,
	returns the boolean that flags player death*/
	bool moveMonster(int xChange, int yChange);

	/*Asks the player how many traps should be added to the dungeon*/
	void initDungeon();
	
	/*Prints out the end screen and returns true if 
	the player wants to play the game again*/
	bool endScreen();

public:
	Dungeon();
	~Dungeon();

	void runGame();
};

